<template>
    <div class="porductReviews" v-if="rowsTotal !== 0" >
      <div v-for="item in rowsList" :key="item.comment_id">
        <div class="header">
        <img src="../assets/categood.png" alt="">
        <span class="name">{{item.user.nick_name}}</span>
        <span class="rate"><van-rate v-model="value"  readonly size="15px"/></span>
       </div>
       <div class="center">
        <div>
            {{item.content }}
         <div class="dateTime">
        <span class="date">{{ item.create_time }}</span>
       </div>
       </div>
    </div>
      </div>
    </div>

</template>

<script>
export default {
  name: 'porductReviewsIndex',
  data () {
    return {
      value: 5
    }
  },
  props: ['rowsTotal', 'rowsList']
}
</script>

<style lang="less" scoped>
.porductReviews{
    margin: 10px 0 10px 0;
    .header{
        padding: 10px;
        img{
            width: 30px;
            height: 30px;
            border-radius: 50%;
        vertical-align: middle;

        }
        .name{
            margin-left: 5px;
        }
        .rate{
            margin-left: 6px;
        }
    }
    .center{
        padding: 0 10px 0 10px;
        .dateTime{
      color: #a5a5a5;
      margin-top: 10px;
      .time{
        margin-left: 5px;
      }
        }

    }
}

</style>
